<template>
    <div>
        <!-- 特码 -->
        <LhcContinuous @contBetFun="contBet" @betdataObj="betdataObj" :ninetime="ninetime" :betmoney="betmoneys" :resetinp="resetinps" :openBet="openBets" v-if="levelid == 1" />
        <!-- 特肖 -->
        <LhcTx @betdataObj="betdataObj" :ninetime="ninetime" :betmoney="betmoneys" :resetinp="resetinps" :openBet="openBets" v-if="levelid == 2" />
        <!-- 特码头尾数 -->
        <LhcTmtws @betdataObj="betdataObj" :ninetime="ninetime" :betmoney="betmoneys" :resetinp="resetinps" :openBet="openBets" v-if="levelid == 3" />
        <!-- 两面 -->
        <LhcLm @betdataObj="betdataObj" :ninetime="ninetime" :betmoney="betmoneys" :resetinp="resetinps" :openBet="openBets" v-if="levelid == 4" />
        <!-- 色波 -->
        <LhcSb @betdataObj="betdataObj" :ninetime="ninetime" :betmoney="betmoneys" :resetinp="resetinps" :openBet="openBets" v-if="levelid == 5" />
        <!-- 七色波 -->
        <LhcQsb @betdataObj="betdataObj" :ninetime="ninetime" :betmoney="betmoneys" :resetinp="resetinps" :openBet="openBets" v-if="levelid == 6" />
        <!-- 正码 -->
        <LhcZm @contBetFun="contBet" :ninetime="ninetime" @betdataObj="betdataObj" :betmoney="betmoneys" :resetinp="resetinps" :openBet="openBets" v-if="levelid == 7" />
        <!-- 正码特 -->
        <LhcZmt @contBetFun="contBet" :ninetime="ninetime" @betdataObj="betdataObj" :betmoney="betmoneys" :resetinp="resetinps" :openBet="openBets" v-if="levelid == 8" />
        <!-- 正码1~6 -->
        <LhcZmdh @betdataObj="betdataObj" :ninetime="ninetime" :betmoney="betmoneys" :resetinp="resetinps" :openBet="openBets" v-if="levelid == 9" />
        <!-- 平特一肖尾数 -->
        <LhcPtyxws @betdataObj="betdataObj" :ninetime="ninetime" :betmoney="betmoneys" :resetinp="resetinps" :openBet="openBets" v-if="levelid == 10" />
        <!-- 五行 -->
        <LhcWx @betdataObj="betdataObj" :ninetime="ninetime" :betmoney="betmoneys" :resetinp="resetinps" :openBet="openBets" v-if="levelid == 11" />
        <!-- 合肖 -->
        <LhcHx @contBetFun="contBet" @betdataObj="betdataObj" :ninetime="ninetime" :betmoney="betmoneys" :resetinp="resetinps" :openBet="openBets" v-if="levelid == 12" />
        <!-- 正肖 -->
        <LhcZx @betdataObj="betdataObj" :ninetime="ninetime" :betmoney="betmoneys" :resetinp="resetinps" :openBet="openBets" v-if="levelid == 13" />
        <!-- 总肖 -->
        <LhcZox @betdataObj="betdataObj" :ninetime="ninetime" :betmoney="betmoneys" :resetinp="resetinps" :openBet="openBets" v-if="levelid == 14" />
        <!-- 自选不中 -->
        <LhcZxbz @contBetFun="contBet" @betdataObj="betdataObj" :ninetime="ninetime" :betmoney="betmoneys" :resetinp="resetinps" :openBet="openBets" v-if="levelid == 15" />
        <!-- 连肖 -->
        <LhcLx @contBetFun="contBet" @betdataObj="betdataObj" :ninetime="ninetime" :betmoney="betmoneys" :resetinp="resetinps" :openBet="openBets" v-if="levelid == 16" />
        <!-- 连尾 -->
        <LhcLw @contBetFun="contBet" @betdataObj="betdataObj" :ninetime="ninetime" :betmoney="betmoneys" :resetinp="resetinps" :openBet="openBets" v-if="levelid == 17" />
        <!-- 连码 -->
        <LhcLma @contBetFun="contBet" @betdataObj="betdataObj" :ninetime="ninetime" :betmoney="betmoneys" :resetinp="resetinps" :openBet="openBets" v-if="levelid == 18" />
        <!-- 过关 -->
        <LhcGg @contBetFun="contBet" @betdataObj="betdataObj" :ninetime="ninetime" :betmoney="betmoneys" :resetinp="resetinps" :openBet="openBets" v-if="levelid == 19" />
        <!-- 生肖双面 -->
        <LhcSxsm @betdataObj="betdataObj" :ninetime="ninetime" :betmoney="betmoneys" :resetinp="resetinps" :openBet="openBets" v-if="levelid == 20" />
    </div>
    
    
</template>
<script>

    export default {
        name: "Lhc",
        props: {  //普通类型：String、Number、Boolean、Null    引用类型： Array、Object
            betmoney: {   //   下注金额
                type: String,
                required: true
            },
            resetinp: {   //   是否重填已下注金额  0为未下注  其他为已下注
                type: Number,
                required: true
            },
            openBet: {  //开奖  可下注
                type: Boolean,
                required: true
            },
            ninetime: {  //90s
                type: Number,
                required: true
            },
        },
        data(){
            return{
                levelid: 0,  //二级菜单id
                betmoneys: '',  //下注金额
                resetinps: 0,  //是否重填已下注  0为未下注  其他为已下注
                openBets: false,  //开奖
            }
        },
        methods: {
            init(){
                this.levelid = this.$route.query.levelid;
            },
            betdataObj(data){
                console.log('---------------------gdklsfgame',data);
                this.$emit('betdataObj',data)
            },
            //连码  
            contBet(obj){
                console.log(obj);
                this.$emit('contBetObj',obj);
            },
            
        },
        mounted(){
            this.init();
        },
        watch :{
            betmoney(now,old){
                this.betmoneys = now;
            },
            resetinp(now,old){
                this.resetinps = now;
            },
            openBet(now,old){
                console.log('-----gdklsfgame-----openBet',now);
                this.openBets = now;
                
            }
        },
    }
</script>
